// const {
// 	$USetCache,
// 	$UGetCache,
// 	$URemoveCacheAll,
// } = require('@utils/storage')

import { setCookie, getCookie, delCookie } from "@utils/cookie";
module.exports = {
    LOG_IN(state, userInfo) {
        state.userInfo = userInfo;
        // $USetCache('userInfo', userInfo)
        setCookie("ddexuser", JSON.stringify(userInfo));
    },

    LOG_OUT(state) {
        state.userInfo = null;
        // $URemoveCacheAll()
        delCookie("ddexuser");
    },

    loginDialogControl(state, flag) {
        state.adminSession = flag;
    }
};
